package com.example.lifecycle;


import android.arch.lifecycle.Lifecycle;
import android.arch.lifecycle.LifecycleObserver;
import android.arch.lifecycle.OnLifecycleEvent;

public class TestListener implements LifecycleObserver {

    @OnLifecycleEvent(Lifecycle.Event.ON_START)
    public void start() {
        System.out.println("TestListener：start");
    }

    @OnLifecycleEvent(Lifecycle.Event.ON_RESUME)
    public void resume() {
        System.out.println("TestListener：resume");

    }

    @OnLifecycleEvent(Lifecycle.Event.ON_STOP)
    public void stop() {
        System.out.println("TestListener：stop");
    }

}
